package she_ji_mo_shi.dan_li.impl;

import she_ji_mo_shi.dan_li.LoadBalancer;

public class LazySingletonLoadBalancer implements LoadBalancer {
    private static LazySingletonLoadBalancer INSTANCE = null;
    public int mark;
    private LazySingletonLoadBalancer(){
        mark = 5;
    };
    public static LazySingletonLoadBalancer getLoadBalancer(){
        if (INSTANCE == null) {
            synchronized (LazySingletonLoadBalancer.class) {
                if (INSTANCE == null) {
                    INSTANCE = new LazySingletonLoadBalancer();
                }
            }
        }
        return INSTANCE;
    }
    public static void reset() {
        INSTANCE = null;
    }
    @Override
    public void addServer(String server) {

    }

    @Override
    public void removeServer(String server) {

    }

    @Override
    public String getServer() {
        return "";
    }
}
